Risk Item Trigger
This document details the Risk Item trigger within the Basket Audit Evaluation service. This trigger determines the need for a basket audit (full or partial) based on the presence and quantity of specific "risk items" within a customer's basket. These risk items are identified through attributes sent with each item in the check for audit
call.
Purpose
The Risk Item trigger allows retailers to flag baskets containing items identified as high-risk for theft or loss. This allows for targeted audits based on specific items in a basket, rather than relying solely on aggregate metrics like total basket value or item count. The trigger can be configured to initiate either a full or partial audit.
Functionality
The trigger evaluates each item in the basket against a set of risk criteria defined by attributes. These attributes are sent with the item information in the check for audit
request. The following attributes are used:
RiskItemType
: Defines the type of risk comparison to perform. Possible values are:WeightLessThanOrEqual (1)
: Item weight is less than or equal to the threshold.WeightGreaterThan (2)
: Item weight is greater than the threshold.QuantityLessThanOrEqual (3)
: Item quantity is less than or equal to the threshold.QuantityGreaterThan (4)
: Item quantity is greater than the threshold.PriceLessThanOrEqual (5)
: Item price is less than or equal to the threshold.PriceGreaterThan (6)
: Item price is greater than the threshold.
RiskItemThresholdValue
: A decimal value representing the threshold for the comparison specified byRiskItemType
.Weight
(required for weight-based comparisons): A decimal value representing the weight of the item. This attribute is only required whenRiskItemType
isWeightLessThanOrEqual
orWeightGreaterThan
.
An item is considered a "risk item" if it meets the criteria defined by these attributes. For example, an item with RiskItemType = WeightGreaterThan
, RiskItemThresholdValue = 1.0
, and Weight = 1.5
would be flagged as a risk item.
The trigger itself can be configured to activate based on different criteria related to the identified risk items (e.g., any risk item present, risk item count exceeds threshold, weighted risk score exceeds threshold). This configuration is done within the Trust Level service.
Configuration (Trust Level Service)
In addition to the item attributes, the overall Risk Item trigger behavior is configured within the Trust Level service. This configuration determines how the trigger reacts to the presence of risk items. Options include:
Audit Type:
- Full: All items in the basket are audited.
- Partial: Only a subset of items in the basket are audited. The specific items to be audited are determined by the Basket Audit service.
Random Sampling Factor (One out of X): This setting allows you to trigger an audit for only a fraction of baskets that meet the risk item criteria. For example, a setting of "One out of 5" would trigger an audit for only 20% of the baskets containing risk items. Use with caution: This setting can undermine the targeted nature of the Risk Item trigger and should be used judiciously. It can be helpful for increasing interventions on specific products or categories without auditing every basket containing those items.
Data & Events
When the Risk Item trigger activates, it contributes to the overall audit decision made by the Basket Audit Evaluation service. The information about the activated trigger is included in the audit determined event published to Pub/Sub. This allows for tracking and analysis of the effectiveness of the Risk Item trigger.
Further Information
Refer to the Trust Level service documentation for detailed instructions on configuring the Risk Item trigger. For information about the Pub/Sub messages, consult the relevant Pub/Sub documentation. Contact the development team for any further questions.